The present invention relates to a document processing device which can generate a layout structure of a document by applying a template (i.e., rules for layout) to a logical structure of the document.
In general, both of the logical development and the layout of an actual output document are important factors of the document. However, the layout is not necessarily important in the process of producing a document. For example, although the layout is necessary once the contents of a document are determined, in some cases the layout is not important in an initial stage of document production where the logical development is not clear yet. Further, different layouts may be required for one logical development in some cases; for instance, when the same document needs to be distributed to a plurality of persons or sections.
Recognizing the above, there have been proposed techniques of generating a layout representing structure called "layout structure" from a structure called "logical structure" which represents the chapter construction of a document. The process of generating a layout structure from a logical structure is called a layout process, and is performed by a program (layout processing program) that is incorporated in a document processing system.
In order to generate various forms of layout structures from the same logical structure, the operation of a layout processing program needs to be modified. However, in general, a program itself cannot be modified properly by ordinary users because the modification needs expert knowledge. For this reason, there has been employed a technique of altering a program by using parameters such as "page size is A4" and "double column setting."
However, according to this technique, the kinds of specifiable parameters are limited to ones that are preset in the program. Further, to control the operation of a layout processing program having many functions, it is necessary to specify a large number of parameters, which precludes ordinary users from using such a program.
To solve the above problems, there were proposed techniques of controlling a layout processing program by using, rather than simple parameters, a data structure representing a layout template. One of those techniques is a "generic layout structure" prescribed in the international standards "ODA" (ISO8613, Information Processing-Text and Office Systems-Office Document Architecture (ODA) and Interchange Format (1989)).
The ODA only sets forth data structures for representing document structures and guidelines for their use, and does not describe actual layout processes. However, it is apparent that the following functions are needed to perform layout operations according to the ODA. The layout process having the following functions is hereinafter referred to as "ODA layout process."
(1) Layout processing function based on a layout template (generic layout structure) PA1 (2) Layout process selecting function (top-down or bottom-up) PA1 (3) Reuse of a layout result PA1 (4) Category-based layout processing function PA1 (1) Two-dimensional position relative to the superordinate object (In the ODA, this information is retained as an attribute "position.") PA1 (2) Information on the own size (This information is retained as an attribute "dimensions" in the ODA.) PA1 (3) In the case of a layout object that is not a block, an identifier or pointer indicating a layout object subordinate thereto (This information is retained as an attribute "subordinates" in the DOA.) PA1 (4) In the case of a layout object that is a block, an identifier or pointer indicating a content portion subordinate thereto (This information is retained as an attribute "content portions" in the ODA.) PA1 (1) Generating a minimum layout structure that satisfies the limitations of a layout template. PA1 (2) Generating a layout object (block) corresponding to a logical object (basic logical object) having a content portion. PA1 (3) Disposing the generated block at a layout node (lowest-rank frame) corresponding to a lowest-rank node of the layout template. PA1 (4) If necessary, altering the layout structure within a range permitted by the layout template. For example, a new lower-rank frame is generated by adding a new page when the space in the lowest-rank frame for accommodating blocks has been used up. PA1 (1) A content portion has a large content and cannot be accommodated by a generated lowest-rank frame. PA1 (2) The content of a content portion is a figure or table which cannot be accommodated by a generated lowest-rank frame and cannot be divided. PA1 means for retaining a plurality of partial layout templates each expressing rules for producing a layout of a partial logical structure; PA1 means for extracting, from a logical structure of a document to be processed, a logical node array including first logical nodes corresponding to respective basic logical objects having respective content portions and second logical nodes representing respective partial logical structures and designating respective partial layout templates selected from the partial layout templates retained by the partial layout templates retaining means; PA1 means for managing the extracted logical node array; and PA1 partial layout means for performing a partial layout operation to generate a partial layout structure by applying, to one of the partial logical structures, one of the selected partial layout templates corresponding thereto, and sequentially performing the partial layout operation in accordance with the extracted logical node array to produce a layout of the entire document logical structure. PA1 means for retaining a plurality of partial layout templates each expressing rules for producing a layout of a partial logical structure; and PA1 a plurality of formatters provided for respective logical nodes of a logical structure of a document to be processed, and operating in a parallel manner to generate respective partial layout structures by applying, to respective partial logical structures, respective partial layout templates selected from the partial layout templates retained by the partial layout templates retaining means, the formatters starting to operate from a highest-rank formatter downwards.
The functions (mechanisms) (1)-(4) are not necessarily effected individually, but may be combined when desired. The combining of the functions will improve the efficiency of the layout process.
The above functions (mechanisms) are described below one by one using a specific example.